package javacode.chapter04;

import java.util.Scanner;

public class Example4_2 {
    public static void main(String[] args) {
        //求三个数中的最大数
        int a, b, c;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入三个整数：");
        a = scanner.nextInt();
        b = scanner.nextInt();
        c = scanner.nextInt();

        if (a < b) {
            a = b;
        }
        if (a < c) {
            a = c;
        }
        System.out.println("输入的三个整数中最大数是：" + a);
    }
}
